
*** Replication codes 
cd "C:\Works\dissertation\DMCA project\replication_rr"

clear
import delim using "replication_data.csv"


// Tables 3 and 4
* Owners and representatives
sum expert_representative employee inhouse_counsel outside_attorney security_company unspecified

* Remove employees and unspecified representatives
keep if employee != 1 & unspecified != 1

* Dummy variables
sum revise_and_resubmit chance_to_change demand anti_circumvention license

* Continuous variables
sum ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy infringing_url_count fork, detail


// Table 5
reg settled chance_to_change demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled chance_to_change demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled chance_to_change demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog chance_to_change demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 


// Table 6
psmatch2 chance_to_change expert_representative demand infringing_url_count fork, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1

psmatch2 chance_to_change expert_representative demand infringing_url_count fork anti_circumvention license, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1

psmatch2 chance_to_change expert_representative demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy infringing_url_count fork anti_circumvention license, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1


// Table 7
quietly psmatch2 chance_to_change expert_representative demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy infringing_url_count fork anti_circumvention license, out(settled) norepl 
quietly gen delta = settled - _settled if _treat==1 & _support==1
rbounds delta, gamma(1 (0.05) 2)
drop delta


// Table 8
reg settled revise_and_resubmit demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled revise_and_resubmit demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled revise_and_resubmit demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog revise_and_resubmit demand expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 


// Table 9
psmatch2 revise_and_resubmit expert_representative demand infringing_url_count fork, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1

psmatch2 revise_and_resubmit expert_representative demand infringing_url_count fork anti_circumvention license, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1

psmatch2 revise_and_resubmit expert_representative demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy infringing_url_count fork anti_circumvention license, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1


// Table 10
quietly gen delta = settled - _settled if _treat==1 & _support==1
rbounds delta, gamma(1 (0.05) 2)
drop delta


// Table 11 
clear
import delim using "replication_data.csv"

sum chance_to_change if expert_representative == 0
sum chance_to_change if inhouse_counsel == 1
sum chance_to_change if outside_attorney == 1
sum chance_to_change if security_company == 1

sum revise_and_resubmit if expert_representative == 0
sum revise_and_resubmit if inhouse_counsel == 1
sum revise_and_resubmit if outside_attorney == 1
sum revise_and_resubmit if security_company == 1

sum demand if expert_representative == 0
sum demand if inhouse_counsel == 1
sum demand if outside_attorney == 1
sum demand if security_company == 1

sum infringing_url_count if expert_representative == 0
sum infringing_url_count if inhouse_counsel == 1
sum infringing_url_count if outside_attorney == 1
sum infringing_url_count if security_company == 1

sum fork if expert_representative == 0
sum fork if inhouse_counsel == 1
sum fork if outside_attorney == 1
sum fork if security_company == 1

sum anti_circumvention if expert_representative == 0
sum anti_circumvention if inhouse_counsel == 1
sum anti_circumvention if outside_attorney == 1
sum anti_circumvention if security_company == 1

sum license if expert_representative == 0
sum license if inhouse_counsel == 1
sum license if outside_attorney == 1
sum license if security_company == 1

sum ownership_fog if expert_representative == 0
sum ownership_fog if inhouse_counsel == 1
sum ownership_fog if outside_attorney == 1
sum ownership_fog if security_company == 1

sum ownership_ner if expert_representative == 0
sum ownership_ner if inhouse_counsel == 1
sum ownership_ner if outside_attorney == 1
sum ownership_ner if security_company == 1

sum ownership_word if expert_representative == 0
sum ownership_word if inhouse_counsel == 1
sum ownership_word if outside_attorney == 1
sum ownership_word if security_company == 1

sum infringement_fog if expert_representative == 0
sum infringement_fog if inhouse_counsel == 1
sum infringement_fog if outside_attorney == 1
sum infringement_fog if security_company == 1

sum infringement_ner if expert_representative == 0
sum infringement_ner if inhouse_counsel == 1
sum infringement_ner if outside_attorney == 1
sum infringement_ner if security_company == 1

sum infringement_word if expert_representative == 0
sum infringement_word if inhouse_counsel == 1
sum infringement_word if outside_attorney == 1
sum infringement_word if security_company == 1

sum redundancy if expert_representative == 0
sum redundancy if inhouse_counsel == 1
sum redundancy if outside_attorney == 1
sum redundancy if security_company == 1


// Table 12
* Remove employees and unspecified representatives
keep if employee != 1 & unspecified != 1

reg settled inhouse_counsel outside_attorney security_company demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled inhouse_counsel outside_attorney security_company demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled inhouse_counsel outside_attorney security_company demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog inhouse_counsel outside_attorney security_company demand infringing_url_count fork anti_circumvention license, vce(robust) 


// Table 13
reg settled ownership_fog ownership_ner ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled ownership_fog ownership_ner ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled ownership_fog ownership_ner ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog ownership_fog ownership_ner ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

reg settled infringement_fog infringement_ner infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled infringement_fog infringement_ner infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled infringement_fog infringement_ner infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog infringement_fog infringement_ner infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

reg settled ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 


// Table 14
psmatch2 expert_representative demand infringing_url_count fork, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1

psmatch2 expert_representative demand infringing_url_count fork anti_circumvention license, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1

psmatch2 expert_representative demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy infringing_url_count fork anti_circumvention license, out(settled) norepl cal(0.05)
pstest settled
* Number of paired takedown notices
count if _weight == 1


// Table 15
quietly psmatch2 expert_representative demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy infringing_url_count fork anti_circumvention license, out(settled) norepl
quietly gen delta = settled - _settled if _treat==1 & _support==1
rbounds delta, gamma(1 (0.05) 2)
drop delta


// Table 16
reg settled expert_representative##c.url_accuracy demand fork anti_circumvention license, vce(robust) 


// Table 17
reg settled expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

reg settled expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word demand infringing_url_count fork anti_circumvention license, vce(robust) 

reg settled expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word expert_representative##c.redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 

logit settled expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word expert_representative##c.redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 

probit settled expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word expert_representative##c.redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog settled_cloglog expert_representative##c.ownership_fog expert_representative##c.ownership_ner expert_representative##c.ownership_word expert_representative##c.infringement_fog expert_representative##c.infringement_ner expert_representative##c.infringement_word expert_representative##c.redundancy demand infringing_url_count fork anti_circumvention license, vce(robust) 


// Table 18
reg demand chance_to_change expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit demand chance_to_change expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit demand chance_to_change expert_representative infringing_url_count fork anti_circumvention license, vce(robust)  

cloglog demand_cloglog chance_to_change expert_representative infringing_url_count fork anti_circumvention license, vce(robust)  


// Table 19
reg demand revise_and_resubmit expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit demand revise_and_resubmit expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit demand revise_and_resubmit expert_representative infringing_url_count fork anti_circumvention license, vce(robust)  

cloglog demand_cloglog revise_and_resubmit expert_representative infringing_url_count fork anti_circumvention license, vce(robust)  


// Table 20
reg demand inhouse_counsel outside_attorney security_company infringing_url_count fork anti_circumvention license, vce(robust) 

logit demand inhouse_counsel outside_attorney security_company infringing_url_count fork anti_circumvention license, vce(robust) 

probit demand inhouse_counsel outside_attorney security_company infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog demand_cloglog inhouse_counsel outside_attorney security_company infringing_url_count fork anti_circumvention license, vce(robust) 


// Table 21
reg demand ownership_fog ownership_ner ownership_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit demand ownership_fog ownership_ner ownership_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit demand ownership_fog ownership_ner ownership_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog demand_cloglog ownership_fog ownership_ner ownership_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

reg demand infringement_fog infringement_ner infringement_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit demand infringement_fog infringement_ner infringement_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit demand infringement_fog infringement_ner infringement_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

cloglog demand_cloglog infringement_fog infringement_ner infringement_word expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

reg demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

logit demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 

probit demand ownership_fog ownership_ner ownership_word infringement_fog infringement_ner infringement_word redundancy expert_representative infringing_url_count fork anti_circumvention license, vce(robust) 
